#include <CarPhysics.h>
Inheritance diagram for CarPhysics:

Public Member Functions | |
| CarPhysics (Vehicle &vehicle) | |
| virtual | ~CarPhysics () |
| virtual double | update (double step) |
| virtual void | odeDraw () |
| bool | create (const CarData *carDataPtr, osg::ref_ptr< osg::PositionAttitudeTransform > objectPAT) |
| void | setSteering (double steer) |
| void | setAccelleration (double acl) |
| void | setGear (int gear) |
| double | getSpeed () |
| double | getTraction () |
| const Vector3 & | getPosition () |
| const double * | getRotation () |
| void | setPosition (double x, double y, double z) |
| void | setRotation (double x, double y, double z) |
| void | mySetPosition () |
| Vehicle * | getOSGVehicle () |
Protected Member Functions | |
| void | positionCar (double x, double y, double z) |
| const double * | getGeomPosition (dGeomID geom) |
| const double * | getGeomRotation (dGeomID geom) |
| void | addGeom (dGeomID geom, dReal xoff, dReal yoff, dReal zoff, dMatrix3 R) |
Protected Attributes | |
| const CarData * | _pCarData |
| double | _steering |
| double | _accel |
| double | _speed |
| double | _traction |
| double | _chassisHgt |
| double | _gearMod |
| dBodyID | _carBody |
| dBodyID | _wheelBody [4] |
| dJointID | _joint [4] |
| dSpaceID | _carSpace |
| vector< dGeomID > | _carGeoms |
| dGeomID | _wheelGeom [4] |
| PhysGeomData | _wheelData |
| Vehicle | OSGvehicle |
Definition at line 5 of file CarPhysics.h.
|
|
A constructor with one argument.
Definition at line 6 of file CarPhysics.cpp. References _accel, _carBody, _carSpace, _chassisHgt, _gearMod, _joint, _speed, _steering, _traction, _wheelBody, _wheelGeom, and OSGvehicle. |
|
|
A destructor. Definition at line 1 of file CarPhysics.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 417 of file CarPhysics.cpp. References _carBody, _carGeoms, and _carSpace. Referenced by create(). |
|
||||||||||||
|
a normal member taking two arguments and returning a bool.
Definition at line 42 of file CarPhysics.cpp. References _carBody, _carSpace, _chassisHgt, _pCarData, PhysicsClient::_space, _wheelBody, _wheelData, _wheelGeom, PhysicsClient::_world, and addGeom(). Referenced by AnimationWindow::createCarPhysics(). |
|
|
a protected member taking one arguments and returning const double *.
Definition at line 355 of file CarPhysics.cpp. Referenced by getPosition(). |
|
|
Definition at line 379 of file CarPhysics.cpp. Referenced by getRotation(). |
|
|
Definition at line 561 of file CarPhysics.cpp. References OSGvehicle. |
|
|
Definition at line 276 of file CarPhysics.cpp. References _carGeoms, and getGeomPosition(). |
|
|
Definition at line 290 of file CarPhysics.cpp. References _carGeoms, and getGeomRotation(). |
|
|
Definition at line 263 of file CarPhysics.cpp. References _carBody. |
|
|
Definition at line 42 of file CarPhysics.h. References _traction. |
|
|
Definition at line 398 of file CarPhysics.cpp. References TraffEduObject::getObjectPATvector(), Vehicle::getPath(), Path::getPointVector(), OSGvehicle, setPosition(), and setRotation(). |
|
|
A virtual member. updates simulation state. Implements PhysicsClient. Definition at line 440 of file CarPhysics.cpp. References _carBody, _carGeoms, TraffEduObject::getObjectPAT(), and OSGvehicle. |
|
||||||||||||||||
|
a protected member taking three arguments and returning void.
Definition at line 326 of file CarPhysics.cpp. References _carBody, and _wheelBody. Referenced by setPosition(). |
|
|
Definition at line 38 of file CarPhysics.h. References _accel. |
|
|
Definition at line 250 of file CarPhysics.cpp. References _gearMod. |
|
||||||||||||||||
|
Definition at line 297 of file CarPhysics.cpp. References positionCar(). Referenced by mySetPosition(). |
|
||||||||||||||||
|
Definition at line 305 of file CarPhysics.cpp. References _carBody, and _wheelBody. Referenced by mySetPosition(). |
|
|
Definition at line 37 of file CarPhysics.h. References _steering. |
|
|
A virtual member.
Implements PhysicsClient. Definition at line 183 of file CarPhysics.cpp. References _accel, _gearMod, _joint, _pCarData, PhysicsClient::_space, _speed, and PhysicsClient::_world. |
|
|
a protected variable. current acceleration. Definition at line 88 of file CarPhysics.h. Referenced by CarPhysics(), setAccelleration(), and update(). |
|
|
a protected variable. body id of vehicle. Definition at line 112 of file CarPhysics.h. Referenced by addGeom(), CarPhysics(), create(), getSpeed(), odeDraw(), positionCar(), and setRotation(). |
|
|
a protected variable. vector for car geometries (actually dGeomTransforms). Definition at line 134 of file CarPhysics.h. Referenced by addGeom(), getPosition(), getRotation(), and odeDraw(). |
|
|
a protected variable. space for car geometries. Definition at line 129 of file CarPhysics.h. Referenced by addGeom(), CarPhysics(), and create(). |
|
|
a protected variable. height of chassis. Definition at line 100 of file CarPhysics.h. Referenced by CarPhysics(), and create(). |
|
|
a protected variable. gear modifier, used for gear switching (transmission). Definition at line 105 of file CarPhysics.h. Referenced by CarPhysics(), setGear(), and update(). |
|
|
a protected variable. joint ids of vehicle wheels. Definition at line 123 of file CarPhysics.h. Referenced by CarPhysics(), and update(). |
|
|
a protected variable. struct for car attributes. Definition at line 78 of file CarPhysics.h. |
|
|
a protected variable. current car speed. Definition at line 93 of file CarPhysics.h. Referenced by CarPhysics(), and update(). |
|
|
a protected variable. current steering (-1=left 1=right). Definition at line 83 of file CarPhysics.h. Referenced by CarPhysics(), and setSteering(). |
|
|
Definition at line 95 of file CarPhysics.h. Referenced by CarPhysics(), and getTraction(). |
|
|
a protected variable. body ids of vehicle wheels. Definition at line 117 of file CarPhysics.h. Referenced by CarPhysics(), create(), positionCar(), and setRotation(). |
|
|
Definition at line 140 of file CarPhysics.h. Referenced by create(). |
|
|
a protected variable. geom for each wheel. Definition at line 139 of file CarPhysics.h. Referenced by CarPhysics(), and create(). |
|
|
Definition at line 141 of file CarPhysics.h. Referenced by CarPhysics(), getOSGVehicle(), mySetPosition(), and odeDraw(). |
1.4.6-NO